<template>
  <div class="page-proj">
    <div class="top">
      <div class="name">（{{ proj?.company }}）{{ proj?.name }}</div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import useProj from '@renderer/composables/useProj'
import { onBeforeRouteUpdate, useRoute } from 'vue-router'

const { find, proj } = useProj()
const route = useRoute()

onBeforeRouteUpdate(async (to) => {
  await find(+to.params.id)
})
find(+route.params.id)
</script>

<style lang="scss" scoped>
.page-proj {
  @apply w-full h-full bg-slate-100 px-5 pt-5;
  .top {
    @apply px-5;
    .name {
      @apply py-2 text-lg;
    }
    .company {
      @apply text-xs font-bold opacity-50;
    }
    .dianya {
      @apply text-xs font-bold opacity-50;
    }
  }
}
</style>
